<style scoped  lang="less">
.demo-Circle-custom{
    & h1{
        color: #3f414d;
        font-size: 28px;
        font-weight: normal;
    }
    & p{
        color: #657180;
        font-size: 14px;
        margin: 10px 0 15px;
    }
    & span{
        display: block;
        padding-top: 15px;
        color: #657180;
        font-size: 14px;
        &:before{
            content: '';
            display: block;
            width: 50px;
            height: 1px;
            margin: 0 auto;
            background: #e0e3e6;
            position: relative;
            top: -15px;
        };
    }
    & span i{
        font-style: normal;
        color: #3f414d;
    }
}
</style>
<template>
<div>
    <Card :bordered="false" dis-hover>
        <p slot="title">调用管理</p>
        <!-- <Row :gutter="20">
			<Col span="8">
				<i-circle
			        :size="200"
			        :trail-width="2"
			        :stroke-width="2"
			        :percent="75"
			        stroke-linecap="square"
			        stroke-color="#43a3fb">
			        <div class="demo-Circle-custom">
			            <h1>42,001,776</h1>
			            <p>消费人群规模</p>
			            <span>
			                总占人数
			                <i>75%</i>
			            </span>
			        </div>
			    </i-circle>
			</Col>
        </Row> -->
        <Row :gutter="20">
            <!-- <Col span="6">
                <Input v-model="search.paramData.orderNo" placeholder="发票号" ></Input>
            </Col> -->
            <Col span="8">
                <RadioGroup v-model="search.paramData.reqType" type="button">
                    <Radio label="">全部</Radio>
                    <Radio label="red">红冲</Radio>
                    <Radio label="blue">开票</Radio>
                    <Radio label="rz">认证</Radio>
                    <Radio label="vali">查验</Radio>
                </RadioGroup>
            </Col>
            <!-- <Col span="10">
                <DatePicker type="datetimerange" format="yyyy-MM-dd" 
                placeholder="开票日期" v-model="search.paramData.date"
                @on-change="(r)=>{search.paramData.date=r}" style="width:100%;"></DatePicker>
            </Col> -->
            <Col span="2">
                <Button type="primary" icon="ios-search" @click="getdata('search')">搜索</Button>
            </Col>
        </Row>

        
        <br/>
        <div class="ivu-table-wrapper" >
            <div class="ivu-table ivu-table-with-fixed-top ">
                
                <div class="ivu-table-body" >
                    <table class="table_border _table"  cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
                        
                        <thead>
                            <tr>
                                <th class="">
                                    <div class="ivu-table-cell">
                                        <span>调用应用</span>
                                    </div>
                                </th>
                                <th class="">
                                    <div class="ivu-table-cell">
                                        <span>调用时间</span>
                                    </div>
                                </th>
                                <th class="" style="width:100px;">
                                    <div class="ivu-table-cell">
                                        <span>调用类型</span>
                                    </div>
                                </th>
                                <th class="">
                                    <div class="ivu-table-cell">
                                        <span>调用结果</span>
                                    </div>
                                </th>
                                <th class="" >
                                    <div class="ivu-table-cell">
                                        <span>返回信息</span>
                                    </div>
                                </th>
                            </tr>
                        </thead>
                        <tbody class="ivu-table-tbody" v-for="item in data">
                            <tr class="ivu-table-row">
                                <td class="">
                                    <div class="ivu-table-cell">
                                        <span>
                                            {{item.client_name}}</span>
                                    </div>
                                </td>
                                <td class="">
                                    <div class="ivu-table-cell">
                                        <span>{{item.req_date  }}</span>
                                    </div>
                                </td>
                                <td class="">
                                    <div class="ivu-table-cell" >
                                        <span 
                                    v-bind:style="item.req_type | decode('reqTypeColor') " >
                                            {{item.req_type | decode('reqType')}}
                                        </span>
                                    </div>
                                </td>
                                <td class="">
                                    <div class="ivu-table-cell">
                                        <span 
                                    v-bind:style="item.req_flag | decode('isSuccessColor') ">
                                            {{item.req_flag | decode('isSuccess')}}
                                        </span>
                                    </div>
                                </td>
                                <td class="">
                                    <div class="ivu-table-cell">
                                        <span>{{item.req_result}}</span>
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <div class="body_empty" v-if="data.length==0 ">
                        暂无数据
                    </div>
                </div>
            </div>
            
        </div>
        <p style="margin-top:10px;">
            <Page  show-total :page-size="search.pageSize" :current="search.pageNo"   :total="page.total" 
            show-total @on-change="changePage" style="float:right;"></Page>
        </p>
    </Card>
</div>	
</template>
<script>
export default {
    data (){
        return {
            check:false,
            page:{pageSize:2,total:0},
            search:{pageNo:1,pageSize:10,paramData:{orderNo:null}},
            data:[
                
            ]
        }
    },methods:{
        changePage (pageNum){
            this.search.pageNo = pageNum;
            this.getdata();
        },getdata(type){
            if(type=='search'){
                this.search.pageNo=1;
            }
            this.axios.post('/report/queryReqLog',
                this.search).then((res)=>{
                console.log(res);
                //this.data=res.data.list;
                var d=res.data.list;
                this.data=res.data.list;
                this.page.total=res.data.total;
                this.search.pageNo=res.data.pageNo || 1;
            })
        },show(item){
            this.$bus.emit('bus_entryedit',item.guid)
        },checkchange(item){
            this.data.forEach(function(val){
                val.check=item;
            })
        }
    },mounted(){
        $('._table').resizableColumns({});
    },created(){
        this.getdata();
    },activated(){
        this.getdata();
    }
}
</script>